﻿@model Package
@{
    Layout = "~/Views/Shared/_Dashboard.cshtml";
}
@UIHelper.ImageTitle(Html.Global("RES_VERIFY"), Html.Global("Verify_Desc"), Url.Content("~/content/images/accept.png"))
@if (Model != null)
{
    @UIHelper.SectionHeader(Html.Global("Verify_Package_Detail"))
    <table>
        <tr>
            <td style="width: 200px; vertical-align: top; text-align: center;">
                @{var _img = Model.Images.FirstOrDefault();}
                @if (_img != null)
                {
                    <img src="@Model.ResolveUrl(_img.Url)" alt="@Model.Title" />
                }
                 else
                {
                   <img src="@Url.Content("~/content/images/img_package_nopreview.png")" alt="nopreview" />
                }
                <div>
                    @Ajax.Dna().Button().LocText("RES_INSTALL").Click("location=\"" + Url.Action("Exec", "Deploy", new { name = Model.Name }) + "\"").GetHtml()
                    @Ajax.Dna().Button().LocText("RES_REMOVE").Click("location=\"" + Url.Action("Remove", "Deploy", new { name = Model.Name }) + "\"").GetHtml()
                </div>
            </td>
            <td style="vertical-align: top;">
                @UIHelper.PackageInfo(Model)
            </td>
        </tr>
    </table>
    @UIHelper.SectionHeader(Html.Global("Verify_FilesInPackage"))
    @(Ajax.Dna().TreeView()
    .Bind(ViewBag.FileProvider as HierarchicalNodeProviderBase)
    .GetHtml())
}
